package com.spring.xiatian.order.core;

import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自定义 MapperScan
 * Created by Created by xiaoxia on 2017/10/30 0030 13:37.
 */
//@Configuration
//@AutoConfigureAfter({SessionFactoryConfiguration.class})
public class MyBatisMapperScannerConfig {

    @Bean
    public MapperScannerConfigurer mapperScannerConfigurer(){
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();

        mapperScannerConfigurer.setSqlSessionFactoryBeanName("sqlSessionFactory");
        mapperScannerConfigurer.setBasePackage("com.spring.xiatian.order.dao");


        return mapperScannerConfigurer;
    }

}
